<div class="panel panel-primary" >
    <div class="panel-heading">
        <div class="panel-title">新增内容</div>
    </div>
    <div class="panel-body">
        <div class="row megbox">
            <div id="successbox" role="alert" ng-show="meg_success" class="ng-binding ng-hide">

            </div>
            <div id="errorbox" role="alert" ng-show="meg_error" class="ng-binding ng-hide">

            </div>
        </div>
        <div class="row">
            <div class="col-md-12">

                <form class="form-horizontal" role="form" name="userForm" ng-submit="postForm()">

                    <div class="form-group">
                        <label class="col-md-2 control-label">
                            标题：
                        </label>
                        <div class="col-md-10" ng-class="{ 'has-error': userForm.title.$invalid && !userForm.title.$pristine }">
                            <input type="text" name="title" class="form-control" placeholder="标题" ng-model="user.title" ng-click="errorBye()" required ng-minlength="11">
                            <p ng-show="userForm.title.$invalid && !userForm.title.$pristine" class="help-block">请输入有效的标题</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">
                            内容：
                        </label>
                        <div class="col-md-10">
                            <textarea rows="6" name="content" class="form-control" placeholder="内容" ng-model="user.content" ng-click="errorBye()" required></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">
                            类别：
                        </label>
                        <div class="col-md-3">
                            <select name="typeid" class="form-control " ng-model="user.typeid"  ng-click="errorBye()" required>
                                <option value="" class="">-- 选择分类 --</option>
                                <option value="0">前端</option>
                                <option value="1">安卓</option>
                                <option value="2">IOS</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-md-offset-2 col-md-10">
                            <input type="submit" value="保存" class="btn btn-success" ng-disabled="userForm.$invalid" ng-click="errorShow()" disabled="disabled">
                            <a ui-sref="user.info" class="btn btn-primary" href>取消</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>